package com.zhengsr.wanandroid.data;

import com.zhengsr.corelib.bean.BannerBean;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhengshaorui
 * Time on 2019/2/12
 */

public class CacheDataManager {
    private  List<BannerBean> mBannerDatas;
    private static class Holder {
        static final CacheDataManager INSTANCE = new CacheDataManager();
    }

    public static CacheDataManager getInstance() {
        return Holder.INSTANCE;
    }

    private CacheDataManager() {
    }

    public void updateBannerData( List<BannerBean> bannerDatas){
        if (mBannerDatas == null){
            mBannerDatas = new ArrayList<>();
        }
        mBannerDatas.clear();
        mBannerDatas.addAll(bannerDatas);
    }
    public  List<BannerBean> getCacheBanner(){
        return mBannerDatas;
    }
}
